7ab267d8727de9c95e4c32f23411a3c771db09f3,drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java,AccumulateNode,assertLeftTuple,#LeftTuple#PropagationContext#InternalWorkingMemory#,122
Before Change
handle,
workingMemory );
} else {
this.accumulate.accumulate( memory.workingMemoryContext,
accContext,
leftTuple,
handle,
workingMemory );
}
}
}
After Change
*/
public void assertLeftTuple(final LeftTuple leftTuple,
final PropagationContext context,
final InternalWorkingMemory workingMemory) {
final AccumulateMemory memory = (AccumulateMemory) workingMemory.getNodeMemory( this );
AccumulateContext accresult = new AccumulateContext();
if ( this.tupleMemoryEnabled ) {
memory.betaMemory.getLeftTupleMemory().add( leftTuple );
memory.betaMemory.getCreatedHandles().put( leftTuple,
accresult,
false );
}
accresult.context = this.accumulate.createContext();
this.accumulate.init( memory.workingMemoryContext,
accresult.context,
leftTuple,
workingMemory );
this.constraints.updateFromTuple( memory.betaMemory.getContext(),
workingMemory,
leftTuple );
for ( RightTuple rightTuple = memory.betaMemory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
InternalFactHandle handle = rightTuple.getFactHandle();
if ( this.constraints.isAllowedCachedLeft( memory.betaMemory.getContext(),
handle ) ) {
LeftTuple tuple = leftTuple;
if ( this.unwrapRightObject ) {
// if there is a subnetwork, handle must be unwrapped
tuple = (LeftTuple) handle.getObject();
handle = tuple.getLastHandle();
}
this.accumulate.accumulate( memory.workingMemoryContext,
accresult.context,
tuple,
handle,
workingMemory );
// in sequential mode, we don't need to keep record of matched tuples
if ( this.tupleMemoryEnabled ) {